home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 2
/
Amiga Tools 2.iso
/
hardware
/
vector-connection
/
development
/
includes
/
vector
/
vectorpar.h
next >
Wrap
C/C++ Source or Header
|
1995-03-09
|
2KB
|
144 lines
/*
** $Header$
**
*/
/*
** © 1994 Henning Schmiedehausen - TSF Software Development
*/
#ifndef DEVICES_VECTORPAR_H
#define DEVICES_VECTORPAR_H
/*
* Commands
*/
#define PIOCMD_QUERY CMD_NONSTD /* 0x09 */
#define PIOCMD_SETPARAMS (CMD_NONSTD+1) /* 0x0A */
#define PIOCMD_INACTIVE (CMD_NONSTD+2) /* 0x0B */
#define PIOCMD_ACTIVE (CMD_NONSTD+3) /* 0x0c */
#define VECTORPARNAME "vectorpar.device"
/*
* PIO
*
*/
#define PIO_BASE 0*2
#define PIO_PGCR 0*2
#define PIO_PSRR 1*2
#define PIO_PADDR 2*2
#define PIO_PBDDR 3*2
#define PIO_PCDDR 4*2
#define PIO_PIVR 5*2
#define PIO_PACR 6*2
#define PIO_PBCR 7*2
#define PIO_PADR 8*2
#define PIO_PBDR 9*2
#define PIO_PAAR 10*2
#define PIO_PBAR 11*2
#define PIO_PCDR 12*2
#define PIO_PSR 13*2
/*
* Timer
*
*/
#define PIO_TCR 16*2
#define PIO_TIVR 17*2
#define PIO_CPRH 19*2
#define PIO_CPRM 20*2
#define PIO_CPRL 21*2
#define PIO_CNTRH 23*2
#define PIO_CNTRM 24*2
#define PIO_CNTRL 25*2
#define PIO_TSR 26*2
/*
* Channel-relative PIO Definitions
*
*/
#define PIOR_DDR 0*2
#define PIOR_PCR 8*2
#define PIOR_PDR 10*2
#define PIOR_PAR 12*2
#define PIO_ABASE 0
#define PIO_BBASE 2
/*
* Structure to access a PIO chip
*
*/
struct pio
{
UBYTE pio_pgcr;
UBYTE _pad0;
UBYTE pio_psrr;
UBYTE _pad1;
UBYTE pio_paddr;
UBYTE _pad2;
UBYTE pio_pbddr;
UBYTE _pad3;
UBYTE pio_pcddr;
UBYTE _pad4;
UBYTE pio_pivr;
UBYTE _pad5;
UBYTE pio_pacr;
UBYTE _pad6;
UBYTE pio_pbcr;
UBYTE _pad7;
UBYTE pio_padr;
UBYTE _pad8;
UBYTE pio_pbdr;
UBYTE _pad9;
UBYTE pio_paar;
UBYTE _pad10;
UBYTE pio_pbar;
UBYTE _pad11;
UBYTE pio_pcdr;
UBYTE _pad12;
UBYTE pio_psr;
UBYTE _pad13;
UBYTE _pad14a;
UBYTE _pad14;
UBYTE _pad15a;
UBYTE _pad15;
UBYTE pio_tcr;
};
/*
* Structure to access a channel
*
*/
struct pchannel
{
UBYTE pc_ddr;
UBYTE _padpc0;
UBYTE _padpc1;
UBYTE _padpc2;
UBYTE _padpc3;
UBYTE _padpc4;
UBYTE _padpc5;
UBYTE _padpc6;
UBYTE pc_pcr;
UBYTE _padpc7;
UBYTE _padpc8;
UBYTE _padpc9;
UBYTE pc_pdr;
UBYTE _padpca;
UBYTE _padpcb;
UBYTE _padpcc;
UBYTE pc_par;
};
#endif /* DEVICES_VECTORPAR_H */